package liangtWorkSpace.springAll.di.constructor;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author liangt
 * @ClassName: ByNameMain
 * @title: ByNameMain
 * @projectName liangtWorkSpace.springAll.di.byName
 * @description: TODO
 * @date 2020/10/15 18:47
 */
public class ConstructorMain {
    public static void main(String[] args) {
        String xmlPath = "DI/constructor/Beans.xml";

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);

        TextEditor textEditor = (TextEditor) applicationContext.getBean("TextEditor");
        textEditor.spellCheck();
    }
}
